local icol = Color( 255, 255, 255, 255 ) 
if CLIENT then
	killicon.Add( "m9k_thrown_sticky_grenade", "vgui/hud/m9k_sticky_grenade", icol  )
	killicon.Add( "m9k_thrown_m61", "vgui/hud/m9k_m61_frag", icol  )
	killicon.Add( "m9k_thrown_knife", "vgui/hud/m9k_machete", icol  )
	killicon.Add( "m9k_thrown_harpoon", "vgui/hud/m9k_harpoon", icol  )
	killicon.Add( "m9k_sent_nuke_radiation", "vgui/hud/m9k_davy_crockett", icol  )
	killicon.Add( "m9k_released_poison", "vgui/hud/m9k_nerve_gas", icol  )
	killicon.Add( "m9k_sent_nuke_radiation", "vgui/hud/m9k_davy_crockett", icol  )
	killicon.Add( "m9k_davy_crockett_explo", "vgui/hud/m9k_davy_crockett", icol  )
	killicon.Add( "m9k_proxy", "vgui/hud/m9k_proxy_mine", icol  )
	killicon.Add( "m9k_milkor_nade", "vgui/hud/m9k_milkormgl", icol  )
	killicon.Add( "m9k_suicide_bomb", "vgui/hud/m9k_suicide_bomb", icol  )
	killicon.Add( "m9k_mad_c4", "vgui/hud/m9k_suicide_bomb", icol  )
	killicon.Add( "m9k_m202_rocket", "vgui/hud/m9k_m202", icol  )
	killicon.Add( "m9k_launched_m79", "vgui/hud/m9k_m79gl", icol  )
	killicon.Add( "m9k_improvised_explosive", "vgui/hud/m9k_ied_detonator", icol  )
	killicon.Add( "m9k_gdcwa_matador_90mm", "vgui/hud/m9k_matador", icol  )
	killicon.Add( "m9k_gdcwa_rpg_heat", "vgui/hud/m9k_rpg7", icol  )
	killicon.Add( "m9k_damascus", "vgui/hud/m9k_damascus", icol  )
	killicon.Add( "m9k_fists", "vgui/hud/m9k_fists", icol  )
	killicon.Add( "m9k_machete", "vgui/hud/m9k_machete", icol  )
	killicon.Add( "m9k_launched_ex41", "vgui/hud/m9k_ex41", icol  )
	killicon.Add( "m9k_orbital_cannon", "vgui/hud/m9k_orbital_strike", icol  )
	killicon.Add( "m9k_knife", "vgui/hud/m9k_knife", icol  )

	language.Add("40mmGrenade_ammo", "40mm Grenade")
	language.Add("C4Explosive_ammo", "C4")
	language.Add("ProxMine_ammo", "Proximity Mine")
	language.Add("Improvised_Explosive_ammo", "Improvised Explosive Device")
	language.Add("Nuclear_Warhead_ammo", "Nuclear Warhead")
	language.Add("NerveGas_ammo", "Nerve Gas")
	language.Add("StickyGrenade_ammo", "Sticky Grenade")
	language.Add("SatCannon_ammo", "Orbital Strike Cannon")
end

if SERVER then

	if GetConVar("M9KWeaponStrip") == nil then
		CreateConVar("M9KWeaponStrip", "1", { FCVAR_REPLICATED, FCVAR_NOTIFY, FCVAR_ARCHIVE }, "Allow empty weapon stripping? 1 for true, 0 for false")
		print("Weapon Strip con var created")
	end
	
	if GetConVar("M9KGasEffect") == nil then
		CreateConVar("M9KGasEffect", "1", { FCVAR_REPLICATED, FCVAR_NOTIFY, FCVAR_ARCHIVE }, "Use gas effect when shooting? 1 for true, 0 for false")
		print("Gas effect con var created")
	end
	
	if GetConVar("M9KDisablePenetration") == nil then
		CreateConVar("M9KDisablePenetration", "0", { FCVAR_REPLICATED, FCVAR_NOTIFY, FCVAR_ARCHIVE }, "Disable Penetration and Ricochets? 1 for true, 0 for false")
		print("Penetration/ricochet con var created")
	end
	
	util.AddNetworkString("PenetrationSynch")
	function PenetrationChangeCallback(cvar, previous, new)
		net.Start("PenetrationSynch")
		net.WriteBit(new)
		net.Broadcast()
	end
	cvars.AddChangeCallback("M9KDisablePenetration", PenetrationChangeCallback)

end

if CLIENT then

	if GetConVar("M9KWeaponStrip") == nil then
		CreateClientConVar("M9KWeaponStrip", "1", true, true)
		print("client-side Weapon Strip Con Var created")
	end
	
	if GetConVar("M9KGasEffect") == nil then
		CreateClientConVar("M9KGasEffect", "1", true, true)
		print("client-side Gas Effect Con Var created")
	end
	
	if GetConVar("M9KDisablePenetration") == nil then
		CreateClientConVar("M9KDisablePenetration", "0", true, true )
		print("client-side Penetration/Ricochet Con Var created")
	end

end


if GetConVar("M9KDynamicRecoil") == nil then
	CreateConVar("M9KDynamicRecoil", "1", { FCVAR_REPLICATED, FCVAR_NOTIFY, FCVAR_ARCHIVE }, "Use Aim-modifying recoil? 1 for true, 0 for false")
	print("Recoil con var created")
end

net.Receive("PenetrationSynch", 
function(new)
	RunConsoleCommand("M9kDisablePenetration", tostring(new))
	print("Penetration and Ricochets have been synchronized with server.")
	
end)


game.AddAmmoType( {
	name = "SatCannon",
	dmgtype = DMG_BULLET
} )

game.AddAmmoType( {
	name = "40mmGrenade",
	dmgtype = DMG_BULLET
} )

game.AddAmmoType( {
	name = "C4Explosive",
	dmgtype = DMG_BULLET
} )

game.AddAmmoType( {
	name = "ProxMine",
	dmgtype = DMG_BULLET
} )

game.AddAmmoType( {
	name = "Improvised_Explosive",
	dmgtype = DMG_BULLET
} )

game.AddAmmoType( {
	name = "Nuclear_Warhead",
	dmgtype = DMG_BULLET
} )

game.AddAmmoType( {
	name = "NerveGas",
	dmgtype = DMG_BULLET
} )

game.AddAmmoType( {
	name = "StickyGrenade",
	dmgtype = DMG_BULLET
} )
	
if GetConVarString("nuke_yield") == nil then --if one of them doesn't exists, then they all probably don't exist
	CreateConVar("nuke_yield", 200, { FCVAR_REPLICATED, FCVAR_ARCHIVE }, "nuke variables" )
	CreateConVar("nuke_waveresolution", 0.2, { FCVAR_REPLICATED, FCVAR_ARCHIVE }, "nuke variables" )
	CreateConVar("nuke_ignoreragdoll", 1, { FCVAR_REPLICATED, FCVAR_ARCHIVE }, "nuke variables" )
	CreateConVar("nuke_breakconstraints", 1, { FCVAR_REPLICATED, FCVAR_ARCHIVE }, "nuke variables" )
	CreateConVar("nuke_disintegration", 1, { FCVAR_REPLICATED, FCVAR_ARCHIVE }, "nuke variables" )
	CreateConVar("nuke_damage", 100, { FCVAR_REPLICATED, FCVAR_ARCHIVE }, "nuke variables" )
	CreateConVar("nuke_epic_blastwave", 1, { FCVAR_REPLICATED, FCVAR_ARCHIVE }, "nuke variables" )
	CreateConVar("nuke_radiation_duration", 0, { FCVAR_REPLICATED, FCVAR_ARCHIVE }, "nuke variables" )
	CreateConVar("nuke_radiation_damage", 0, { FCVAR_REPLICATED, FCVAR_ARCHIVE }, "nuke variables" )
end

if GetConVar("DavyCrockettAllowed") == nil then
	CreateConVar("DavyCrockettAllowed", "1", { FCVAR_REPLICATED, FCVAR_NOTIFY, FCVAR_ARCHIVE }, "Allow people to shoot the Davy Crockett?")
end

//EX41
sound.Add({
	name =			"EX41.Pump",
	channel =		CHAN_ITEM,
	volume =		1,
	sound =			"weapons/ex41/m3_pump.wav"
})

sound.Add({
	name =			"EX41.Insertshell",
	channel =		CHAN_ITEM,
	volume =		1,
	sound =			"weapons/ex41/m3_insertshell.wav"
})

sound.Add({
	name =			"EX41.Draw",
	channel =		CHAN_ITEM,
	volume =		1,
	sound =			"weapons/ex41/draw.wav"
})

//RPG
sound.Add({
	name =				"RPGF.single",
	channel =			CHAN_USER_BASE+10,
	volume =			1.0,
	soundlevel =			155,
	sound =				"GDC/Rockets/RPGF.wav"
})

sound.Add({
	name =				"M202F.single",
	channel =			CHAN_USER_BASE+10,
	volume =			1.0,
	soundlevel =			155,
	sound =				"GDC/Rockets/M202F.wav"
})

sound.Add({
	name =				"MATADORF.single",
	channel =			CHAN_USER_BASE+10,
	volume =			1.0,
	soundlevel =			155,
	sound =				"GDC/Rockets/MATADORF.wav"
})

//Suicide bomb
sound.Add({
	name = 			"sb.click",
	channel = 		CHAN_USER_BASE+10,
	volume = 		"1",
	sound = 			"weapons/suicidebomb/c4_click.wav"
})

// m79 grenade launcher

sound.Add({
	name = 			"M79_launcher.close",
	channel = 		CHAN_ITEM,
	volume = 		1.0,
	sound = 			"weapons/M79/m79_close.wav"
	
})

sound.Add({
	name = 			"M79_glauncher.barrelup",//GET THIS SOUND!
	channel = 		CHAN_ITEM,
	volume = 		1.0,
	sound = 			"weapons/M79/barrelup.wav"
	
})

sound.Add({
	name = 			"M79_glauncher.InsertShell",//GET THIS SOUND!
	channel = 		CHAN_ITEM,
	volume = 		1.0,
	sound = 			"weapons/M79/xm_insert.wav"
	
})

sound.Add({
	name = 			"M79_launcher.draw" ,
	channel = 		CHAN_ITEM,
	volume = 		1.0,
	sound = 			"weapons/M79/m79_close.wav"
	
})

sound.Add({
	name = 			"40mmGrenade.Single" ,
	channel = 		CHAN_USER_BASE+10,
	volume = 		1.0,
	sound = 			"weapons/M79/40mmthump.wav"
	
})